using System.IO;
using System.Web.Mvc;

namespace Sealight.UI.WebUI.UIHelpers.Localization
{
    public class LocalizationWebFormView : WebFormView
    {
        internal const string ViewPathKey = "__ViewPath__";

        public LocalizationWebFormView(ControllerContext context, string viewPath) : base(context,viewPath)
        {
        }

        public LocalizationWebFormView(ControllerContext context, string viewPath, string masterPath)
            : base(context, viewPath, masterPath)
        {
        }

        //public override void RenderView(ViewContext viewContext, TextWriter writer)
        //{
        //    // there seems to be a bug with RenderPartial tainting the page's view data
        //    // so we should capture the current view path, and revert back after rendering
        //    string originalViewPath = (string) viewContext.ViewData[ViewPathKey];
            
        //    viewContext.ViewData[ViewPathKey] = ViewPath;
        //    base.Render(viewContext, writer);
            
        //    viewContext.ViewData[ViewPathKey] = originalViewPath;
        //}
    }
}